import request from "@/utils/request";
export const apis = {
  add: (data) => {
    return request({
      url: "/job/plan/bill/declare/add",
      method: "post",
      data: data,
    });
  },
  query: (params) => {
    return request({
      url: "/job/plan/bill/declare/list",
      method: "get",
      params,
    });
  },
  del: (row) => {
    return request({
      url: "/job/plan/bill/declare/delete",
      method: "delete",
      data: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/job/plan/bill/declare/edit",
      method: "put",
      data: data,
    });
  },
  approval: (data) => {
    return request({
      url: "/job/plan/bill/approval/submit",
      method: "post",
      data: data,
    });
  },
  queryPerson: (params) => {
    return request({
      url: "/job/plan/bill/declare/queryJobPersonnel",
      method: "get",
      params,
    });
  },
  detail: (id) => {
    return request({
      url: "/job/plan/bill/declare/" + id,
      method: "get",
    });
  },
  saveBillData: (data) => {
    return request({
      url: "/app/create/job/bill/add",
      method: "post",
      data: data,
    });
  },
  renewal: (data) => {
    return request({
      url: "/job/plan/bill/declare/renewal",
      method: "post",
      data: data,
    });
  },
};

export const stopAndRestart = {
  add: (data) => {
    return request({
      url: "/jobPlanBillDeclareOperate/add",
      method: "post",
      data: data,
    });
  },
  query: (params) => {
    return request({
      url: "/jobPlanBillDeclareOperate/list",
      method: "get",
      params,
    });
  },
  del: (row) => {
    return request({
      url: "/jobPlanBillDeclareOperate/delete",
      method: "delete",
      data: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/jobPlanBillDeclareOperate/edit",
      method: "put",
      data: data,
    });
  },
  detail: (id) => {
    return request({
      url: "/jobPlanBillDeclareOperate/" + id,
      method: "get",
    });
  },
};
